package com.kehutong.crm.message.entity;

import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.annotation.UnSave;
import org.coraframework.orm.util.IDType;
import com.kehutong.common.enums.MessageBusinessEnum;
import com.kehutong.common.enums.TemplateType;

@Table(value="t_message_global_config", comment="全局消息配置", idType = IDType.TIMESTAMP)
public class MessageGlobalConfig extends Entity {

    private static final long serialVersionUID = 1184669432654085988L;

    protected MessageGlobalConfig(String id) {
        super(id);
    }

    @Column(comment = "模块类型")
    private MessageBusinessEnum businessEnum;

    @Column(comment = "模板类型")
    private TemplateType templateEnum;

    @Column(comment = "是否发送应用消息")
    private boolean appSend;

    @Column(comment = "应用模板ID")
    private String appTemplate;

    @Column(comment = "是否发送站内信消息")
    private boolean innerSend;

    @Column(comment = "站内信模板ID")
    private String innerTemplate;

    @Column(comment = "是否发送手机短信")
    private boolean smsSend;

    @Column(comment = "手机短信模板ID")
    private String smsTemplate;

    @Column(comment = "是否发送公众号模板消息")
    private boolean wxchatSend;

    @Column(comment = "公众号模板消息模板ID")
    private String wxchatTemplate;

    @Column(comment="是否删除")
    private boolean deleted;

    @UnSave
    private MessageTemplateInner messageTemplateInner;
    @UnSave
    private MessageTemplateApp messageTemplateApp;
    @UnSave
    private MessageTemplateSms messageTemplateSms;

    public MessageBusinessEnum getBusinessEnum() {
        return businessEnum;
    }

    public void setBusinessEnum(MessageBusinessEnum businessEnum) {
        this.businessEnum = businessEnum;
    }

    public TemplateType getTemplateEnum() {
        return templateEnum;
    }

    public void setTemplateEnum(TemplateType templateEnum) {
        this.templateEnum = templateEnum;
    }

    public boolean isAppSend() {
        return appSend;
    }

    public void setAppSend(boolean appSend) {
        this.appSend = appSend;
    }

    public String getAppTemplate() {
        return appTemplate;
    }

    public void setAppTemplate(String appTemplate) {
        this.appTemplate = appTemplate;
    }

    public boolean isInnerSend() {
        return innerSend;
    }

    public void setInnerSend(boolean innerSend) {
        this.innerSend = innerSend;
    }

    public String getInnerTemplate() {
        return innerTemplate;
    }

    public void setInnerTemplate(String innerTemplate) {
        this.innerTemplate = innerTemplate;
    }

    public boolean isSmsSend() {
        return smsSend;
    }

    public void setSmsSend(boolean smsSend) {
        this.smsSend = smsSend;
    }

    public String getSmsTemplate() {
        return smsTemplate;
    }

    public void setSmsTemplate(String smsTemplate) {
        this.smsTemplate = smsTemplate;
    }

    public boolean isWxchatSend() {
        return wxchatSend;
    }

    public void setWxchatSend(boolean wxchatSend) {
        this.wxchatSend = wxchatSend;
    }

    public String getWxchatTemplate() {
        return wxchatTemplate;
    }

    public void setWxchatTemplate(String wxchatTemplate) {
        this.wxchatTemplate = wxchatTemplate;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public MessageTemplateInner getMessageTemplateInner() {
        return messageTemplateInner;
    }

    public void setMessageTemplateInner(MessageTemplateInner messageTemplateInner) {
        this.messageTemplateInner = messageTemplateInner;
    }

    public MessageTemplateApp getMessageTemplateApp() {
        return messageTemplateApp;
    }

    public void setMessageTemplateApp(MessageTemplateApp messageTemplateApp) {
        this.messageTemplateApp = messageTemplateApp;
    }

    public MessageTemplateSms getMessageTemplateSms() {
        return messageTemplateSms;
    }

    public void setMessageTemplateSms(MessageTemplateSms messageTemplateSms) {
        this.messageTemplateSms = messageTemplateSms;
    }

    @Override
    public String toString() {
        return "MessageGlobalConfig{" +
            "businessEnum=" + businessEnum +
            ", templateEnum=" + templateEnum +
            ", appSend=" + appSend +
            ", appTemplate='" + appTemplate + '\'' +
            ", innerSend=" + innerSend +
            ", innerTemplate='" + innerTemplate + '\'' +
            ", smsSend=" + smsSend +
            ", smsTemplate='" + smsTemplate + '\'' +
            ", wxchatSend=" + wxchatSend +
            ", wxchatTemplate='" + wxchatTemplate + '\'' +
            ", deleted=" + deleted +
            ", messageTemplateInner=" + messageTemplateInner +
            ", messageTemplateApp=" + messageTemplateApp +
            ", messageTemplateSms=" + messageTemplateSms +
            '}';
    }
}
